portableSql

StringPad Portable SQL Function

Syntax

StringPad as C (String as C, TotalLength as N [, PadString as C])

Arguments

StringCharacter

A field or value.

TotalLengthCharacter

The maximum length of the new string.

PadStringCharacter

Default = ' ' (a space). The character(s) to pad the string.

Returns

resultCharacter

Returns the right-padded string.

Description

Right-pads a string with the specified character(s) until it is the desired length.

Discussion

The StringPad function appends a string with one or more characters until it is the specified length.

StringPad() function executed on the Northwind Access database
SELECT FIRST 1 StringPad(CompanyName,30,'-') AS Expr1 FROM Customers
=Alfreds Futterkiste-----------